package service.Impl;

import dao.BlogDao;
import dao.Impl.BlogDaoImpl;
import entity.Blog;
import service.BlogService;

import java.time.LocalDate;
import java.util.List;

public class BlogServiceImpl implements BlogService {
    private BlogDao blogDao = new BlogDaoImpl();

    @Override
    public List<Blog> findAll() {
        return blogDao.findAll();
    }

    @Override
    public Blog findById(int id) {
        return blogDao.findById(id);
    }

    @Override
    public void save(Blog blog) {
        blogDao.save(blog);
    }

    @Override
    public void update(Blog blog) {
        blogDao.update(blog);
    }

    @Override
    public void delete(int id) {
        blogDao.delete(id);
    }

    @Override
    public List<Blog> findByTime(String time) {
        return blogDao.findByTime(time);
    }
}
